<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false"%>
<%@ include file="../common/taglibs.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <title>商户信息</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>
    <!-- 当前页面样式 -->
    <link rel="stylesheet" href="<s:url value="/css/common.css"/>"/>
    <!-- 当前页面样式 END -->
    <script type="text/javascript" src="<c:url value="/js/jquery-1.3.2.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/common.js" />"></script>
	<script type="text/javascript" src="<c:url value="/js/My97DatePicker/WdatePicker.js"/>"></script>
    <script type="text/javascript">
		function checkSubmit(){
			var minDate = $.trim($("#minDate").val());
			var maxDate = $.trim($("#maxDate").val());
			
			
			if(!minDate || !maxDate ){
				alert("请选择时间范围");
				return false;
			}
			
			$("#queryMchtList").attr("action","<%=basePath%>/windControllSta/queryMchtList.ct");
			$("#queryMchtList").submit();
		}
		
		function exportSubmit(){
			var minDate = $.trim($("#minDate").val());
			var maxDate = $.trim($("#maxDate").val());
			
			
			if(!minDate || !maxDate ){
				alert("请选择时间范围");
				return false;
			}
			
			$("#queryMchtList").attr("action","<%=basePath%>/windControllSta/exportMchtList.ct");
			$("#queryMchtList").submit();
	    }
	</script>
</head>
<body>
<s:form id="queryMchtList" action="" method="post" theme="simple">
<table class="tb">
    <tbody>
        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h2">POS收单运营管理平台</div></td>
        </tr>

        <tr class="tb-line">
            <td class="tb-td" colspan="4"><div class="tb-h3">商户信息导出</div></td>
        </tr>

        <tr class="tb-line">
        	<td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">日期范围：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-mini"><s:textfield id="minDate"  name="searchCondition.minDate" 
                onfocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" 
                /></label>-<label class="tb-input-mini"><s:textfield id="maxDate"  name="searchCondition.maxDate" 
                onfocus="WdatePicker({dateFmt:'yyyyMMdd',readOnly:true,wdate:true,errDealMode:0});" 
                /></label><code class="asterisk">*</code>
            </td>
            <td width="12%" style="min-width: 150px" align="right" class="tb-td">
                <div class="tb-h4">商户号：</div>
            </td>
            <td class="tb-td">
                <label class="tb-input-normal"><s:textfield id="mchtCd" name="searchCondition.mchtCd" cssClass="queryWidth" /></label>
            </td>
         </tr>
         
         
          

        <tr class="tb-line">
            <td class="tb-td line-submit" align="right" colspan="4">
                <label class="tb-input-submit">
                    <input type="button" value="查   询" onclick="return checkSubmit();"/>
                </label>
                <label class="tb-input-submit">
                    <s:if 
					 test="#request.mtList != null && #request.mtList.size>0">
					   		<input id="szPower" type="button"
							value="导 出" onclick="return exportSubmit();"/>
					   
					</s:if>
					<s:else>
					 	<input id="szPower" disabled="disabled" value="导  出" type="button" /> 
					</s:else>
                </label>
            </td>
        </tr>
        <s:if test="#request.mtList != null && #request.mtList.size>0">
					<tr class="tb-line">
						<td class="tb-td paging"  align="left" colspan="4"> <page:pageCount
								max_pages="11" totalPage="${requestScope.totalPage}"
								currentPage="${requestScope.currentPage}"
								action="${rootPath}/windControllSta/queryMchtList.ct?currentPage=" />

						</td>
					</tr>
	</s:if>
    </tbody>
    
</table>

<div class="big-tb">
    <table class="tb" style="width: 100%;">
        <thead>
            <tr class="tb-line">
                <th class="tb-th" colspan="19">商户信息列表</th>
            </tr>
            <tr class="tb-line bg-gray">
                		<th class="tb-th">导入标志</th>
						<th class="tb-th">商户编号</th>
						<th class="tb-th">商户法定名称</th>
						<th class="tb-th">商户经营名称</th>
						<th class="tb-th">收单机构代码</th>
						<th class="tb-th">地区代码</th>
						<th class="tb-th">商户类别码</th>
						<th class="tb-th">商户状态</th>
						<th class="tb-th">营业证明文件类型</th>
						<th class="tb-th">营业证明文件号码</th>
						<th class="tb-th">商户注册地址</th>
						<th class="tb-th">法人代表姓名</th>
						<th class="tb-th">法定代表人证件类型</th>
						<th class="tb-th">法人代表证件号码</th>
						<th class="tb-th">商户联系人</th>
						<th class="tb-th">商户联系人通讯地址</th>
						<th class="tb-th">移动电话</th>
						<th class="tb-th">特殊计费类型</th>
						<th class="tb-th">特殊计费档次</th>
						
            </tr>
        </thead>
				<tbody>
					<s:iterator value="#request.mtList" status="stat" id="mt">
						<tr class="tb-line">
							<td class="tb-td"><s:property value="#mt.importFlag" /></td>
							<td class="tb-td"><s:property value="#mt.mchtCd" /></td>
							<td class="tb-td"><s:property value="#mt.name" /></td>
							<td class="tb-td"><s:property value="#mt.nameBusi" /></td>
							<td class="tb-td"><s:property value="#mt.bankBelongCd" /></td>
							<td class="tb-td"><s:property value="#mt.areaCd" /></td>
							<td class="tb-td"><s:property value="#mt.mcc" /></td>
							<td class="tb-td"><s:property value="#mt.status" /></td>
							<td class="tb-td"><s:property value="#mt.busiCertifType" /></td>
							<td class="tb-td"><s:property value="#mt.busiLiceNo" /></td>
							<td class="tb-td"><s:property value="#mt.regAddr" /></td>
							<td class="tb-td"><s:property value="#mt.certif" /></td>
							<td class="tb-td"><s:property value="#mt.certifType" /></td>
							<td class="tb-td"><s:property value="#mt.certifNo" /></td>
							<td class="tb-td"><s:property value="#mt.contactName" /></td>
							<td class="tb-td"><s:property value="#mt.txAddr" /></td>
							<td class="tb-td"><s:property value="#mt.phoneNo" /></td>
							<td class="tb-td"><s:property value="#mt.billingType" /></td>
							<td class="tb-td"><s:property value="#mt.billingLevel" /></td>
						</tr>
					</s:iterator>
				</tbody>
			</table>
</div>
</s:form>

<s:if test="#request.msg !=null">
		<script language="javascript">
			alert("${request.msg}");
		</script>
	</s:if>
</body>
</html>